home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.n / gets.n < prev    next >
Text File  |  1995-07-25  |  2KB  |  67 lines

  1.  
  2.  
  3.  
  4.      ggggeeeettttssss((((nnnn))))                      TTTTccccllll (((( ))))                      ggggeeeettttssss((((nnnn))))
  5.  
  6.  
  7.  
  8.      _________________________________________________________________
  9.  
  10.      NNNNAAAAMMMMEEEE
  11.           gets - Read a line from a file
  12.  
  13.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.           ggggeeeettttssss _f_i_l_e_I_d ?_v_a_r_N_a_m_e?
  15.      _________________________________________________________________
  16.  
  17.  
  18.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.           This command reads the next line  from  the  file  given  by
  20.           _f_i_l_e_I_d  and  discards the terminating newline character.  If
  21.           _v_a_r_N_a_m_e is specified then the line is placed in the variable
  22.           by  that  name and the return value is a count of the number
  23.           of characters read (not including the newline).  If the  end
  24.           of the file is reached before reading any characters then -1
  25.           is returned and _v_a_r_N_a_m_e is  set  to  an  empty  string.   If
  26.           _v_a_r_N_a_m_e  is  not specified then the return value will be the
  27.           line (minus the newline character) or an empty string if the
  28.           end  of  the  file is reached before reading any characters.
  29.           An empty string will also be returned if a line contains  no
  30.           characters except the newline, so eeeeooooffff may have to be used to
  31.           determine what really happened.  If the  last  character  in
  32.           the  file is not a newline character then ggggeeeettttssss behaves as if
  33.           there were an additional newline character at the end of the
  34.           file.   _F_i_l_e_I_d  must  be  ssssttttddddiiiinnnn  or  the return value from a
  35.           previous call to ooooppppeeeennnn; it must refer  to  a  file  that  was
  36.           opened  for  reading.   Any  existing  end-of-file  or error  |
  37.           condition on the file is cleared at  the  beginning  of  the  |
  38.           ggggeeeettttssss command.
  39.  
  40.  
  41.      KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  42.           file, line, read
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 7/17/95)
  64.  
  65.  
  66.  
  67.